package com.xuelang.pipeline.infrastructure.application.converter;

import com.xuelang.pipeline.domain.application.Trait;
import com.xuelang.pipeline.infrastructure.application.dataobject.TraitDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 运维特征实体与运维特征DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface TraitToTraitDOConverter {

    TraitToTraitDOConverter INSTANCE = Mappers.getMapper(TraitToTraitDOConverter.class);

    /**
     * Trait转化为TraitDO
     * @param traint
     * @return
     */
    TraitDO traintToTraitDO(Trait traint);

    /**
     * TraitDO转化为Trait
     * @param traintDO
     * @return
     */
    Trait traintDOToTrait(TraitDO traintDO);

}
